package com.sg.dto.biz.component.common;

import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.Objects;

/**
 * @desc OfficialDocumentMsgDto
 * @使用场景
 */
@Data
public class OfficialDocumentMsgDto extends BaseDto implements Serializable {

    /**
     * 消息ID
     */
    @ApiModelProperty("消息ID")
    private String messageId;

    /**
     * 消息内容
     */
    @ApiModelProperty("消息内容")
    private String messageContent;

    /**
     * 消息访问链接
     */
    @ApiModelProperty("消息访问链接")
    private String messageContentUrl;

    /**
     * 发送方身份人员ID
     */
    @ApiModelProperty("发送方身份人员ID")
    private String senderOriginalRoleMemberId;

    /**
     * 发送方账号ID
     */
    @ApiModelProperty("发送方账号ID")
    private String senderUserId;

    /**
     * 发送方头像地址
     */
    @ApiModelProperty("发送方头像地址")
    private String senderProfilePictureAddress;

    /**
     * 发送方姓名
     */
    @ApiModelProperty("发送方姓名")
    private String nameOfSender;

    /**
     * 归属内容ID
     */
    @ApiModelProperty("归属内容ID")
    private String entityId;

    /**
     * 行为类型编码
     */
    @ApiModelProperty("行为类型编码")
    private String behaviorTypeCode;

    /**
     * 操作时间
     */
    @ApiModelProperty("操作时间")
    private Date operateTime;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        OfficialDocumentMsgDto that = (OfficialDocumentMsgDto) o;
        return messageId == that.messageId && messageContent == that.messageContent && messageContentUrl == that.messageContentUrl && senderOriginalRoleMemberId == that.senderOriginalRoleMemberId && senderUserId == that.senderUserId && senderProfilePictureAddress == that.senderProfilePictureAddress && nameOfSender == that.nameOfSender && entityId == that.entityId && behaviorTypeCode == that.behaviorTypeCode && operateTime == that.operateTime;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), messageId, messageContent, messageContentUrl, senderOriginalRoleMemberId, senderUserId, senderProfilePictureAddress, nameOfSender, entityId, behaviorTypeCode, operateTime);
    }

}
